home *** CD-ROM | disk | FTP | other *** search
/ Aminet 31 / Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso / Aminet / comm / news / slrn-src.lha / slrn / doc / slrnfuns.txt < prev    next >
Text File  |  1999-04-27  |  31KB  |  1,386 lines

  1. article_as_string
  2.  
  3.  SYNOPSIS
  4.    -
  5.  
  6.  USAGE
  7.    String article_as_string ()
  8.  
  9.  DESCRIPTION
  10.    This function will return the entire contents of the current
  11.    article as a string.
  12.  
  13.  SEE ALSO
  14.    
  15. --------------------------------------------------------------
  16.  
  17. get_next_art_pgdn_action
  18.  
  19.  SYNOPSIS
  20.    -
  21.  
  22.  USAGE
  23.    Integer get_next_art_pgdn_action ()
  24.  
  25.  DESCRIPTION
  26.    This function may be used to get information about what action slrn
  27.    will take when an attempt is made to go to the next page of the
  28.    current article, e.g., by pressing the space key.  It returns one
  29.    of the following integers:
  30.  
  31.           -1  Not in article mode
  32.            0  Next page of the article will be displayed
  33.            1  The next unread article will be displayed
  34.            2  The newsreader will go to the next newsgroup
  35.  
  36. --------------------------------------------------------------
  37.  
  38. is_article_visible
  39.  
  40.  SYNOPSIS
  41.    -
  42.  
  43.  USAGE
  44.    Integer is_article_visible ()
  45.  
  46.  DESCRIPTION
  47.    This function returns information about whether or not the article
  48.    associated with the current header is visible in a window.
  49.    Specifically, it returns:
  50.  
  51.          0  : if the article window is hidden
  52.          1  : if the article window is showing but the current header
  53.                 does not refer to the article
  54.          3  : if the article window contains the current header article
  55.  
  56.  
  57.  SEE ALSO
  58.    is_article_window_zoomed, call
  59. --------------------------------------------------------------
  60.  
  61. is_article_window_zoomed
  62.  
  63.  SYNOPSIS
  64.    -
  65.  
  66.  USAGE
  67.    Integer is_article_window_zoomed ()
  68.  
  69.  DESCRIPTION
  70.    This function returns 1 if the article window is zoomed, or 0
  71.    otherwise.
  72.  
  73.  SEE ALSO
  74.    is_article_visible, call
  75. --------------------------------------------------------------
  76.  
  77. pipe_article
  78.  
  79.  SYNOPSIS
  80.    -
  81.  
  82.  USAGE
  83.    Void pipe_article (String cmd)
  84.  
  85.  DESCRIPTION
  86.    This function may be used to pipe the current article to the command
  87.    given by the `cmd' argument.
  88.  
  89.  SEE ALSO
  90.    read_mini
  91. --------------------------------------------------------------
  92.  
  93. re_search_article
  94.  
  95.  SYNOPSIS
  96.    -
  97.  
  98.  USAGE
  99.    Integer re_search_article (String pat)
  100.  
  101.  DESCRIPTION
  102.    This function searches forward in the article associated with the
  103.    currently selected header for a string matching the regular
  104.    expression given by the parameter `pat'.  It returns 0 if no
  105.    matching line is found.   Otherwise, it returns 1 and the matching
  106.    line will be left on the stack as a string.
  107.  
  108.  SEE ALSO
  109.    search_article
  110. --------------------------------------------------------------
  111.  
  112. save_current_article
  113.  
  114.  SYNOPSIS
  115.    -
  116.  
  117.  USAGE
  118.    Integer save_current_article (String filename)
  119.  
  120.  DESCRIPTION
  121.    This function saves the currently selected article to a file
  122.    specified by `filename'.  It returns 0 upon success or -1 upon
  123.    failure.
  124.  
  125.  NOTES
  126.    This function always creates a new file.
  127.  
  128.  SEE ALSO
  129.    
  130. --------------------------------------------------------------
  131.  
  132. search_article
  133.  
  134.  SYNOPSIS
  135.    -
  136.  
  137.  USAGE
  138.    Integre search_article (String str)
  139.  
  140.  DESCRIPTION
  141.    This function searches forward in the article associated with the
  142.    currently selected header for the string given by the parameter
  143.    `str'.  It returns 0 if no matching line is found.  Otherwise, it
  144.    returns 1 and the matching line will be left on the stack as a
  145.    string.
  146.  
  147.  SEE ALSO
  148.    re_search_article
  149. --------------------------------------------------------------
  150.  
  151. set_article_window_size
  152.  
  153.  SYNOPSIS
  154.    -
  155.  
  156.  USAGE
  157.    Void set_article_window_size (Integer nrows)
  158.  
  159.  DESCRIPTION
  160.    The `set_article_window_size' may be used to set the height of the
  161.    article window.  The variable `SCREEN_HEIGHT' may be used to
  162.    facilitate this.
  163.  
  164.  SEE ALSO
  165.    
  166. --------------------------------------------------------------
  167.  
  168. get_response
  169.  
  170.  SYNOPSIS
  171.    -
  172.  
  173.  USAGE
  174.    Interger get_response (String choices, String prompt)
  175.  
  176.  DESCRIPTION
  177.    This function will prompt the user for a single character using the
  178.    prompt as specifed by the second parameter.  The first parameter,
  179.    choices, specified the characters that will be accepted.  Any
  180.    character in the prompt string that is preceeded by \001 will be
  181.    given the `response_char' color.
  182.  
  183.  EXAMPLE
  184.    The following:
  185.  
  186.           rsp = get_response ("yYnN", "Are you hungry? \001Yes, \001No");
  187.  
  188.    will return one of the four characters `y', `Y', `n',
  189.    or `N' to the variable `rsp'.
  190.  
  191.  SEE ALSO
  192.    get_yes_no_cancel, set_color, get_select_box_response
  193. --------------------------------------------------------------
  194.  
  195. get_select_box_response
  196.  
  197.  SYNOPSIS
  198.    -
  199.  
  200.  USAGE
  201.    Integer get_select_box_response (title, item_1, ..., n_items)
  202.  
  203.  DESCRIPTION
  204.    This function pops a selection box and queries the user for a
  205.    response.  An integer is returned which indicates the user's choice.
  206.  
  207.  EXAMPLE
  208.  
  209.           variable rsp = get_select_box_response (
  210.                             "Pick a number:",
  211.                             "one", "two", "three", "four",
  212.                             4);
  213.           message (sprintf ("You chose %d", rsp));
  214.  
  215.  
  216.  SEE ALSO
  217.    read_mini, message, get_yes_no_cancel, get_response
  218. --------------------------------------------------------------
  219.  
  220. get_yes_no_cancel
  221.  
  222.  SYNOPSIS
  223.    -
  224.  
  225.  USAGE
  226.    Integer get_yes_no_cancel (str)
  227.  
  228.  DESCRIPTION
  229.    This function displays `str' in the minibuffer after concatenating
  230.    `"? [Y]-es, N-o, C-ancel"' to it.  It then awaits user input and
  231.    returns:
  232.  
  233.            1 if yes
  234.            0 if no
  235.           -1 if cancel
  236.  
  237.  
  238.  NOTES
  239.    If a `%' character is to appear, it must be doubled.
  240.  
  241.  SEE ALSO
  242.    get_select_box_response, getkey, read_mini, select_list_box
  243. --------------------------------------------------------------
  244.  
  245. message_now
  246.  
  247.  SYNOPSIS
  248.    Display a message immediately
  249.  
  250.  USAGE
  251.    Void slrn_message_now (String_Type s)
  252.  
  253.  DESCRIPTION
  254.    This function displays the string `s' to the message area
  255.    immediately.
  256.  
  257.  SEE ALSO
  258.    message, vmessage, error
  259. --------------------------------------------------------------
  260.  
  261. read_mini
  262.  
  263.  SYNOPSIS
  264.    -
  265.  
  266.  USAGE
  267.    String read_mini (String p, String dflt, String init)
  268.  
  269.  DESCRIPTION
  270.    This function will prompt the user for a string value using prompt
  271.    `p'.  The second parameter `dfl' is used to specify the
  272.    default value. If the final parameter is not the empty string
  273.    (`""'), it will be made available to the user for editing.
  274.  
  275.  SEE ALSO
  276.    read_mini_no_echo, getkey, set_input_string, set_input_chars
  277. --------------------------------------------------------------
  278.  
  279. read_mini_no_echo
  280.  
  281.  SYNOPSIS
  282.    -
  283.  
  284.  USAGE
  285.    String read_mini_no_echo (String p, String dflt, String init)
  286.  
  287.  DESCRIPTION
  288.    This function performs the same purpose as `read_mini' except it
  289.    does not echo the entered text to the screen.
  290.  
  291.  SEE ALSO
  292.    read_mini, getkey, set_input_string, set_input_chars
  293. --------------------------------------------------------------
  294.  
  295. select_list_box
  296.  
  297.  SYNOPSIS
  298.    -
  299.  
  300.  USAGE
  301.    String_Type select_list_box (title, s_1, ... s_n, n, active_n)
  302.  
  303.        String_Type title, s_1, ... s_n
  304.        Int_Type n, active_n
  305.  
  306.  
  307.  DESCRIPTION
  308.    This purpose of this function is to present a list of `n' strings,
  309.    specified by the `s_1', ... `s_n' parameters to the user and have
  310.    the user select one.  The user interface for this operation is that
  311.    of a box of strings.  The title of the box is specified by the
  312.    `title' parameter.  The `active_n' parameter specifies which string
  313.    is to be the default selection.  It returns the string selected by
  314.    the user.
  315.  
  316.  SEE ALSO
  317.    get_select_box_response, get_response
  318. --------------------------------------------------------------
  319.  
  320. set_input_chars
  321.  
  322.  SYNOPSIS
  323.    -
  324.  
  325.  USAGE
  326.    Void set_input_chars (String val)
  327.  
  328.  DESCRIPTION
  329.    This function may be used to set the character that will be returned
  330.    by the next prompt for single character input in the minibuffer.
  331.    This is the type of input that `get_response' solicits.
  332.  
  333.  EXAMPLE
  334.  
  335.           set_input_chars ("y");
  336.           if ('y' == get_yes_no_cancel ("Really Quit"))
  337.             quit (0);
  338.  
  339.  
  340.  SEE ALSO
  341.    set_input_string, get_response, get_yes_no_cancel
  342. --------------------------------------------------------------
  343.  
  344. set_input_string
  345.  
  346.  SYNOPSIS
  347.    -
  348.  
  349.  USAGE
  350.    Void set_input_string (String val)
  351.  
  352.  DESCRIPTION
  353.    This function may be used to set the